﻿using UnityEngine;

namespace CGF
{
    public class Rotate : MonoBehaviour
    {

        public Vector3 velocity = new Vector3(0, 0, -300);

        private Vector3 defaultAngle;

        public void Awake()
        {
            defaultAngle = transform.localEulerAngles;
        }

        private void OnEnable()
        {
            transform.localEulerAngles = defaultAngle;
        }

        void Update()
        {
            transform.Rotate(velocity * Time.deltaTime);
        }
    }
}